import request from '@/utils/request'

//群聊列表
export function getGroupChatList(query) {
  return request({
    url: '/group',
    method: 'get',
    params:query
  })
}

//创建群聊
export function ChatListAdd(data) {
  return request({
    url: '/group',
    method: 'post',
    data
  })
}

//编辑群聊
export function ChatListEdit(group_id,{name,avatar,allow_member_count}) {
  return request({
    url: `/group/${group_id}`,
    method: 'put',
    data:{
      name,
      avatar,
      allow_member_count
    }
  })
}

//解散群聊
export function ChatListDismiss(ids) {
  return request({
    url: `/group/dismiss`,
    method: 'post',
    data:{
      ids
    }
  })
}



